home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2004 June
/
PCWorld_2004-06_cd.bin
/
software
/
vyzkuste
/
koolmoves
/
kmsetup.exe
/
{app}
/
Motion Scripts
/
Decode
/
effect.txt
Wrap
Text File
|
2002-11-08
|
2KB
|
66 lines
mcN = "letter";
loop = 0;
loopDelay = 0;
waitCharEnd = 1;
aLetters = new Array();
for (i = 0; i< numChar; i++){
aLetters[i+0] = i;
var letter = this[mcN +i];
letter._visible = false;
letter.init = letterInit;
letter.doEffect = effect;
letter.number = i;
letter.duplicateMovieClip("new" + i, i);
this["new" + i]._visible = false;
}
function letterInit(){
this._visible = false;
for (nl = 0; nl < this._parent.numChar; nl++){
this._parent["new" + nl]._x = this._x;
this._parent["new" + nl]._visible = false;
}
this.count = 0;
this.initX = this._x;
this.initY = this._y;
this.numCirc = this._parent.numCirc;
}
function effect(){
if (this.count != this._parent.numChar){
if(this.count == 0){
this._parent["new" + this.count]._visible = true;
this.count = this.count + 1;
}else{
this._parent["new" + (this.count - 1)]._visible = false;
this._parent["new" + this.count]._visible = true;
this.count = this.count + 1;
}
}else{
this.timesAround = this.timesAround + 1;
if (this.numCirc == this.timesAround){
this._parent["new" + (this.count-1)]._visible = false;
this._visible = true;
this.gotoAndStop("end");
this.count = 0;
this.timesAround = 0;
}else{
this._parent["new" + (this.count-1)]._visible = false;
this.count = 0;
}
}
}
function shuffle(){
return Math.floor(Math.random() * 3) -1;
}
if (random == 1){
aLetters.sort(shuffle);
}
if (reverse == 1){
aLetters.reverse();
}